home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIScriptableInterfaceInfo.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  180 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Mozilla Communicator client code, released
  17.  * March 31, 1998.
  18.  *
  19.  * The Initial Developer of the Original Code is
  20.  * Netscape Communications Corporation.
  21.  * Portions created by the Initial Developer are Copyright (C) 2001
  22.  * the Initial Developer. All Rights Reserved.
  23.  *
  24.  * Contributor(s):
  25.  *   John Bandhauer <jband@netscape.com> (original author)
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  29.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. /* Scriptable version of the information exposed by nsIInterfaceInfo */
  42.  
  43. #include "nsISupports.idl"
  44. #include "nsIInterfaceInfo.idl"
  45. #include "nsIVariant.idl"
  46.  
  47. [scriptable, uuid(312e3b94-dc98-4ccc-b2fb-e3406f905cc6)]
  48. interface nsIScriptableDataType : nsISupports
  49. {
  50.     readonly attribute PRBool isPointer;
  51.     readonly attribute PRBool isUniquePointer;
  52.     readonly attribute PRBool isReference;
  53.     readonly attribute PRBool isArithmetic;
  54.     readonly attribute PRBool isInterfacePointer;
  55.     readonly attribute PRBool isArray;
  56.     readonly attribute PRBool isDependent;
  57.  
  58.     /**
  59.     * This is one of the constants declared in nsIDataType
  60.     */
  61.     readonly attribute PRUint16 dataType;
  62. };
  63.  
  64. [scriptable, uuid(2309482b-4631-455f-833f-5e4e9ce38589)]
  65. interface nsIScriptableParamInfo : nsISupports
  66. {
  67.     readonly attribute PRBool isIn;
  68.     readonly attribute PRBool isOut;
  69.     readonly attribute PRBool isRetval;
  70.     readonly attribute PRBool isShared;
  71.     readonly attribute PRBool isDipper;
  72.  
  73.     readonly attribute nsIScriptableDataType type;
  74.  
  75.     [noscript] void getParamInfo([shared, const, retval] out nsXPTParamInfoPtr aInfo);
  76. };
  77.  
  78. [scriptable, uuid(0f6c5b09-88b0-43ca-b55c-578f24f3d810)]
  79. interface nsIScriptableConstant : nsISupports
  80. {
  81.     readonly attribute string                name;
  82.     readonly attribute nsIScriptableDataType type;
  83.     readonly attribute nsIVariant            value;
  84. };
  85.  
  86. [scriptable, uuid(9228afa2-187c-4feb-9228-5108e640ca33)]
  87. interface nsIScriptableMethodInfo : nsISupports
  88. {
  89.     readonly attribute PRBool isGetter;
  90.     readonly attribute PRBool isSetter;
  91.     readonly attribute PRBool isNotXPCOM;
  92.     readonly attribute PRBool isConstructor;
  93.     readonly attribute PRBool isHidden;
  94.  
  95.     readonly attribute string name;
  96.     readonly attribute PRUint8  paramCount;
  97.  
  98.     nsIScriptableParamInfo getParam(in PRUint8 idx);
  99.  
  100.     readonly attribute nsIScriptableParamInfo result;
  101. };
  102.  
  103. [scriptable, uuid(f902d5ba-2ef6-444e-8a17-52cb70715c10)]
  104. interface nsIScriptableInterfaceInfo : nsISupports
  105. {
  106.     [noscript] attribute nsIInterfaceInfo info;
  107.     
  108.     void init(in nsIIDPtr aIID);
  109.     void initWithName(in string name);
  110.  
  111.     readonly attribute string   name;
  112.     
  113.     readonly attribute nsIIDPtr interfaceID;
  114.  
  115.      /** 
  116.      * True if this object has been sucessfully set to wrap an interface info.
  117.      */
  118.     readonly attribute PRBool isValid;
  119.  
  120.     readonly attribute PRBool isScriptable;
  121.  
  122.     readonly attribute nsIScriptableInterfaceInfo parent;
  123.  
  124.     /**
  125.     * These include counts for parent (and all ancestors).
  126.     */
  127.     readonly attribute PRUint16 methodCount;
  128.     readonly attribute PRUint16 constantCount;
  129.  
  130.     /**
  131.     * These include methods and constants for parent (and all ancestors).
  132.     */
  133.     
  134.     nsIScriptableMethodInfo getMethodInfo(in PRUint16 index);
  135.  
  136.     nsIScriptableMethodInfo getMethodInfoForName(in string methodName, 
  137.                                                  out PRUint16 index);
  138.  
  139.  
  140.     nsIScriptableConstant getConstant(in PRUint16 index);
  141.  
  142.     /**
  143.     * Get the interface information or iid associated with a param of some
  144.     * method in this interface.
  145.     */
  146.  
  147.     nsIScriptableInterfaceInfo getInfoForParam(in PRUint16 methodIndex, 
  148.                                                in nsIScriptableParamInfo param);
  149.  
  150.     nsIIDPtr getIIDForParam(in PRUint16 methodIndex, 
  151.                             in nsIScriptableParamInfo param);
  152.  
  153.  
  154.     nsIScriptableDataType getTypeForParam(in PRUint16 methodIndex, 
  155.                                           in nsIScriptableParamInfo param,
  156.                                           in PRUint16 dimension);
  157.  
  158.     PRUint8 getSizeIsArgNumberForParam(in PRUint16 methodIndex, 
  159.                                        in nsIScriptableParamInfo param,
  160.                                        in PRUint16 dimension);
  161.  
  162.     PRUint8 getLengthIsArgNumberForParam(in PRUint16 methodIndex, 
  163.                                          in nsIScriptableParamInfo param,
  164.                                          in PRUint16 dimension);
  165.  
  166.     PRUint8 getInterfaceIsArgNumberForParam(in PRUint16 methodIndex, 
  167.                                             in nsIScriptableParamInfo param);
  168.  
  169.     PRBool isIID(in nsIIDPtr IID);
  170.  
  171.     readonly attribute PRBool isFunction;
  172.  
  173.     PRBool hasAncestor(in nsIIDPtr iid);
  174. };
  175.  
  176. %{C++
  177. // The contractID for the implementation built in to xpconnect.
  178. #define NS_SCRIPTABLE_INTERFACE_INFO_CONTRACTID "@mozilla.org/scriptableInterfaceInfo;1"
  179. %}
  180.